<template>
    <div class="regMain">
        <el-row>
            <el-col :span="12" style="text-align:left">
                <el-form :inline="true" :model="searchForm" class="demo-form-inline">
                    <el-form-item label="专业名称">
                        <el-select v-model="searchForm.proId" placeholder="专业名称" size="mini" @change="proIdChange()">
                            <el-option
                                    v-for="item in industryOptions"
                                    :key="item.id"
                                    :label="item.name"
                                    :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item label="班级名称">
                        <el-select v-model="searchForm.classes" placeholder="班级名称" size="mini" @change="classesChange()">
                            <el-option
                                    v-for="item in classOptions"
                                    :key="item.id"
                                    :label="item.className"
                                    :value="item.id">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary" icon="el-icon-edit" size="mini" @click="allOption">批量审核</el-button>
                    </el-form-item>
                </el-form>
            </el-col>
        </el-row>
        <el-row>
            <el-col :span="24">
                <el-table
                        ref="multipleTable"
                        :data="tableData"
                        tooltip-effect="dark"
                        style="width: 100%"
                        @selection-change="handleSelectionChange">
                    <el-table-column
                            type="selection"
                            width="55">
                    </el-table-column>
                    <el-table-column
                            label="序号"
                            type="index"
                            width="50">
                    </el-table-column>
                    <el-table-column
                            label="姓名"
                            prop="username"
                            width="120">
                    </el-table-column>
                    <el-table-column
                            label="账号"
                            prop="loginCode"
                            width="200">
                    </el-table-column>
                    <el-table-column
                            prop="proName"
                            label="专业"
                            width="120">
                    </el-table-column>
                    <el-table-column
                            prop="className"
                            label="班级"
                            show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column
                            prop="createTime"
                            label="时间"
                            show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column
                            label="状态"
                            show-overflow-tooltip>
                        <template slot-scope="scope">
                            <span :class="getStatusCss(scope.row.status)">{{getStatusLabel(scope.row.status)}}</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="操作">

                        <template slot-scope="scope">
                            <el-button
                                    size="mini"
                                    type="warning"
                                    @click="auditOne(scope.row)">审核
                            </el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <div class="pageBox">
                    <el-pagination
                            @size-change="handleSizeChange"
                            @current-change="handleCurrentChange"
                            :current-page="page"
                            :page-sizes="[10, 20,50, 100]"
                            :page-size="size"
                            layout="total, sizes, prev, pager, next, jumper"
                            :total="total">
                    </el-pagination>
                </div>
            </el-col>
        </el-row>
    </div>
</template>

<script src="./regManagement.js"></script>

<style lang="scss" scoped src="./regManagement.scss"></style>